<template>
  <div class="q2">
    <div class="q1">
      <div>
        <el-input v-model="username" placeholder="请输入内容"></el-input>
        <el-input v-model="password" placeholder="请输入内容"></el-input>
        <el-button :plain="true" type="primary" @click="add()">主要按钮</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "MyAppLogin",

  data() {
    return {
        username:'',
        password:''
    };
  },

  mounted() {},

  methods: {
    add(){
        if(this.username=='admin'&&this.password=='123456'){
            this.$router.push('/connect')
        }else{
            this.$message('账号或密码不正确');
        }
    }
  },
};
</script>

<style scoped>
* {
  margin: 0;
  padding: 0;
}
.q2 {
  width: 1000px;
  height: 1000px;
  background-color: midnightblue !important;
}
.q1 {
  width: 350px;
  height: 300px;
  background-color: white;
  position: absolute;
  margin-top: 250px;
  margin-left: 300px;
  text-align: center;
  align-items: center;
}
.q1 div{
    margin-top: 30px;
}
</style>